﻿using System;
using Terraria.ModLoader.IO;

namespace Terraria.ModLoader
{
	// Token: 0x020001B8 RID: 440
	internal class LocalMod
	{
		// Token: 0x1700013A RID: 314
		// (get) Token: 0x060011C6 RID: 4550 RVA: 0x0000EEB3 File Offset: 0x0000D0B3
		public string Name
		{
			get
			{
				return this.modFile.name;
			}
		}

		// Token: 0x1700013B RID: 315
		// (get) Token: 0x060011C7 RID: 4551 RVA: 0x0000EEC0 File Offset: 0x0000D0C0
		public string DisplayName
		{
			get
			{
				if (!string.IsNullOrEmpty(this.properties.displayName))
				{
					return this.properties.displayName;
				}
				return this.Name;
			}
		}

		// Token: 0x1700013C RID: 316
		// (get) Token: 0x060011C8 RID: 4552 RVA: 0x0000EEE6 File Offset: 0x0000D0E6
		// (set) Token: 0x060011C9 RID: 4553 RVA: 0x0000EEF3 File Offset: 0x0000D0F3
		public bool Enabled
		{
			get
			{
				return ModLoader.IsEnabled(this.Name);
			}
			set
			{
				ModLoader.SetModEnabled(this.Name, value);
			}
		}

		// Token: 0x060011CA RID: 4554 RVA: 0x0000EF01 File Offset: 0x0000D101
		public override string ToString()
		{
			return this.Name;
		}

		// Token: 0x060011CB RID: 4555 RVA: 0x0000EF09 File Offset: 0x0000D109
		public LocalMod(TmodFile modFile, BuildProperties properties)
		{
			this.modFile = modFile;
			this.properties = properties;
		}

		// Token: 0x060011CC RID: 4556 RVA: 0x0000EF1F File Offset: 0x0000D11F
		public LocalMod(TmodFile modFile) : this(modFile, BuildProperties.ReadModFile(modFile))
		{
		}

		// Token: 0x040013ED RID: 5101
		public readonly TmodFile modFile;

		// Token: 0x040013EE RID: 5102
		public readonly BuildProperties properties;

		// Token: 0x040013EF RID: 5103
		public DateTime lastModified;
	}
}
